package com.corona.game;

import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.g2d.Sprite;
import com.corona.Game;
import com.corona.game.util.TextureCache;

/* compiled from: Player.java */
/* loaded from: pokewilds.jar:com/pkmngen/game/ItemPickupNotify.class */
class ItemPickupNotify extends Action {
    String itemName;
    int quantity;
    public Action.Layer layer = Action.Layer.gui_114;
    int signCounter = 150;
    Sprite bgSprite = new Sprite(TextureCache.get(Gdx.files.internal("text2.png")), 0, 0, 160, 144);

    public ItemPickupNotify(Game game, String itemName, int quantity) {
        super(new Object[0]);
        this.itemName = itemName;
        this.quantity = quantity;
        this.bgSprite.setPosition(0.0f, -144.0f);
    }

    @Override // com.corona.game.Action
    public String getCamera() {
        return "gui";
    }

    @Override // com.corona.game.Action
    public Action.Layer getLayer() {
        return this.layer;
    }

    @Override // com.corona.game.Action
    public void step(Game game) {
        if (this.signCounter > 0) {
            this.signCounter--;
            if (this.signCounter <= 100) {
                if (this.signCounter > 78) {
                    this.bgSprite.setPosition(this.bgSprite.getX(), this.bgSprite.getY() + 1.0f);
                } else if (this.signCounter <= 22) {
                    this.bgSprite.setPosition(this.bgSprite.getX(), this.bgSprite.getY() - 1.0f);
                }
            }
            this.bgSprite.draw(game.uiBatch);
            game.font.draw(game.uiBatch, "Picked up " + this.itemName + " x" + this.quantity + ".", 42.0f, this.bgSprite.getY() + 134.0f);
        }
    }
}
